COMPILER = g++
CCFLAGS = -g
INCLUDES = -I../includes/
LIBRARY = -L../common
LIBNAME = libtagcommon.a
INCDIR = ../includes/

tagserver: tagserver.o
	${COMPILER} ${CCFLAGS} ${INCLUDES} ${LIBRARY} tagserver.o -ltagcommon -o tagserver 

tagserver.o: ${INCDIR}nPatriciaTrie.h ${INCDIR}getabsmod.h tagserver.c tagserver.h
	${COMPILER} ${CCFLAGS} ${INCLUDES} ${LIBRARY} -c tagserver.c

test: testtagserver.o
	${COMPILER} ${CCFLAGS} ${INCLUDES} ${LIBRARY} testtagserver.o -ltagcommon -o testtagserver 

testtagserver.o: ${INCDIR}nPatriciaTrie.h ${INCDIR}getabsmod.h testtagserver.c tagserver.h
	${COMPILER} ${CCFLAGS} ${INCLUDES} ${LIBRARY} -c testtagserver.c

clean :
	rm -rf tagserver
	rm -rf testtagserver
	rm -rf *.o
	rm -rf *~

fresh : clean tagserver
